package com.xw.comm.entity.run;

import com.xw.comm.entity.map.BaseMapObject;
import lombok.Data;

/**
 * 基本的，通用的对象
 *
 * @author ：xiongwei
 * @date ：Created in 2021/9/25 21:25
 */
@Data
public class BaseObject {

    /**
     * 对象Id，与坐标位置IdentifyObject对象的ID对应
     */
    private String objectId;

    /**
     * 位置
     */
    private BaseLocationEnum baseLocation;

    /**
     * 现有的状态
     */
    private BaseObjectStateEnum baseObjectStateEnum;

    /**
     * 基础的地图信息
     */
    private BaseMapObject baseMapObject;

    /**
     * 当前图的过图对象
     */
    private DoorObject currentDoorObject;

    public void addDoorObject(DoorObject doorObject){
        if (null == doorObject){
            return;
        }

        if (currentDoorObject != null && doorObject.getObjectId().equals(currentDoorObject.getObjectId())){
            return;
        }

        currentDoorObject = doorObject;
    }


}
